<?php

define ("OPENING_BULL_IPHONE", '<table id="Tableau_01" width="435" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td>
							<img src="../images/uvagzbs4_01.png" width="435" alt=""></td>
					</tr>');
					
define("CLOSING_BULL_IPHONE", '<tr>
						<td>
							<img src="../images/uvagzbs4_05.gif" width="435" alt=""></td>
					</tr>
				</table>');
define ("OPENING_BULL_IPHONE_PINK", '<table id="Tableau_01" width="435" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td>
							<img src="../images/uvagzbs4_01 copie.png" width="435" alt=""></td>
					</tr>');
					
define("CLOSING_BULL_IPHONE_PINK", '<tr>
						<td>
							<img src="../images/uvagzbs4_05_copy.gif" width="435" alt=""></td>
					</tr>
				</table>');
				
class IphoneBull
{
	public function __construct()
	{
	
	}
	
	public function printMessageInBull($message, $destinataire, $sender)
	{
		
		if ($sender % 2 == 0)
		{
			$result = constant("OPENING_BULL_IPHONE") . '<tr><td style="background-image:url(\'../images/uvagzbs4_03.gif\')"><div style=\'padding-left: 30px;\'>to: ' . $destinataire . '<br /><b>' . $message . '</b></div></td>
							</tr>' . constant("CLOSING_BULL_IPHONE");
			return '<DIV ALIGN=LEFT>' . $result . '</DIV>';
		}
		else
		{
			$result = constant("OPENING_BULL_IPHONE_PINK") . '<tr><td style="background-image:url(\'../images/uvagzbs4_03_copy.gif\')"><div style=\'padding-left: 30px;\'>to: ' . $destinataire . '<br /><b>' . $message . '</b></div></td>
							</tr>' . constant("CLOSING_BULL_IPHONE_PINK");
			return '<DIV ALIGN=RIGHT>' . $result . '</DIV>';	
		}
	}
};

class PropositionUi
{
	public function __construct()
	{
		
	}
	
	public function printPropositionInUi($artist, $title, $location)
	{
		return '<a href="' . $location . '">
								<img border="0" src="../images/music_icon.jpg" alt="">
							</a>' . $artist . " - " . $title . '<br />';
	}
};

class SubjectUi
{
	public function __construct()
	{
		
	}
	
	public function printSubjectInUi($titlesubject, $login)
	{
		return 	"<div>
						<b>".$titlesubject."</b>, by ".$login."
					</div>";
	}
};

?>